<template>
	<view class="my-search-container" :style="{'background-color':bgcolor}">
		<view class="my-search-box" :style="{'border-radius':radius + 'px'}">
			<!-- 使用uni-ui组件 -->
			<uni-icons type="search" size="17"></uni-icons>
			<text class="placeholder">搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
		name: "my-search",
		data() {
			return {

			};
		},
		props: {
			bgcolor: {
				type: String,
				default: '#c00000'
			},
			radius: {
				type: Number,
				// 单位是px
				default: 18
			}
		}
	}
</script>

<style lang="scss">
	.my-search-container {
		height: 50px;
		padding: 0 20rpx;
		display: flex;
		align-items: center;

		.my-search-box {
			display: flex;
			justify-content: center;
			align-items: center;
			width: 100%;
			height: 36px;
			background-color: #fff;

			.placeholder {
				font-size: 30rpx;
				margin-left: 10rpx;
			}
		}
	}
</style>
